Automatic read reassignment method and a magnetic disk drive

ABSTRACT

An automatic replacing method is applicable to a magnetic disc drive used particularly in reading data. When a sign that a unit (sector) at which information is handled may be defective at the time of a reading error is detected (saving threshold), the information in that unit is temporarily stored (saved) in a temporary storage area (backup area). If the unit showing the sign is judged to be definitely defective, the information in that unit is transferred to a safe storage area (replacement area). Thus, fatal reading errors and negligible reading errors can be treated separately.

FIELD OF THE INVENTION

[0001] The present invention relates to magnetic disk drives of the typeused for information storage in electronic computer systems, includingpersonal computers and work stations, and especially to an automaticreassignment function that improves the reliability of storage data.

BACKGROUND OF THE INVENTION

[0002] Generally, with the increase in the storage capacity of a datastorage device that operates as peripheral equipment in a computersystem, the reliability of stored data has become more and moreimportant.

[0003] When computer systems read data from or write data to a unit on adata storage media, a read unable error or a write unable error oftenoccurs for some unknown reason. The result of these kinds of errors isthat data cannot be read out in spite of the receipt of a readinstruction from an upper system, or data is found to be abnormallywritten when reading the data after a write operation that responds to awrite instruction from the system.

[0004] In these cases, as one of the methods of improving the datareliability in a data storage, an automatic reassignment scheme has beenadopted. Here, an automatic reassignment is defined as a technique inwhich a copy of a recorded unit of data (for example, sectors on a trackon magnetic disk media in a magnetic disk drive) is prepared beforehandin a data storage, separately from the set of the recording unit ofdata, and the copy is used instead of the original, if necessary.

[0005] The probability of occurrence of data errors in magnetic diskdrives of the type that are used as external memory devices is higherthan that of conventional drives, since their recording densities aremuch higher and their total storage capacities have become much largerthan ever. Therefore, in the magnetic disk drives for personalcomputers, an automatic reassignment function for sectors having defects(defective sectors) is generally adopted. And, if write errors occur,the data will be written to an alternative area. When read errors occur,by watching the number of retries and writing the data to thealternative area, the reliability of the data is improved.

[0006] It is important for any automatic reassignment technique todetermine when to start execution of a read reassignment process with asuitable timing and how to secure the data integrity. Many differenttechniques have been proposed for these purposes. For example, asdisclosed in a Japanese unexamined patent publication Hei 6-75717,entitled “Read error recovery system for a hard disk drive”, a subtle orfine displacement between a magnetic head and a magnetic disk media isavoided by executing re-reading and writing of data to the samedestination area, when a read error occurs, if the data is read normallybefore a number of the re-reading operations reaches a predeterminednumber. If the number of re-reading operations is equal to thepredetermined number or more, an attempt is made to improve thereliability of the read data by executing the reassignment process toanother area (to store the data to an alternative area). Hei 6-75717discloses a system in which a re-read is executed when a read erroroccurs; and, if the data is read correctly before the number of re-readsreaches a predetermined number, the system writes the data to the samearea.

[0007] If a subtle or fine displacement between a magnetic head and amagnetic disk media is the cause of an error, an execution of repeateddata write operations may be effective. But if an error is caused by theexistence of an infinitesimal bad spot (an infinitesimal defectiveregion) on a sector, that is, by media defects, there is a tendency torepeat the retry of a read operation even though the write operation hasbeen performed normally.

SUMMARY OF THE INVENTION

[0008] The present invention applies an automatic reassignmenttechnique, especially at the time of a read operation, to a magneticdisk drive and performs the following controls.

[0009] The present invention proposes to determine a symptom of a unitthat handles data, which symptom is the cause of a failure resulting inthe occurrence of a read error on the unit, and the data of the unit istemporarily stored (back up process) in a temporary storing area (backup area). If the symptom of the failure is considered to represent adefinite failure, the data of the unit is shifted to a safe storing area(alternation area). As a result, a fatal read error and a temporary readerror are treated differently.

[0010] In other words, a priority level of candidates among data to beshifted to the alternation area is determined dynamically by referringto the number of retry operations related to the read errors. The unitof data is stored in the temporary storing area, which is a back uparea, based on the state of the accumulated number of retries after thetemporary storing, time stamps of data and so on.

[0011] The present invention does not renew directly the data content ofan area, or a unit or a sector to handle data when a normal read isperformed before the number of retries reaches a predetermined number,as in the conventional technology. In accordance with the presentinvention, under such circumstances, a data write command is notexecuted to the area, the unit, nor the sector to handle the data.Rather, the content of data is held in a back up area prepared inadvance and is controlled using a back up data table. Concerning theunit that is judged to be definitely defective among the units of dataheld in the back up area, the content of the definitely-defective unitis transferred to the alternation area, and the reliability of storeddata is improved even if a read error has occurred.

[0012] In the magnetic disk device that is provided with an automaticread reassignment function,

[0013] 1) A back up area that holds the user data temporarily, analternation area that serves as a substitute for the failed area orsectors, and a control area that stores control data are formed on amagnetic disk media in advance, in addition to the user data area thatstores the data of the user (or the data of an electronic computersystem) that uses the storage function of the magnetic disk device.

[0014] 2) When a write command is accepted from a host (host processingunit or electronic computer system) to a sector where an error hasoccurred at the prior read processing, and the read processing isrecovered by a retry processing, the data in the sector to be backed up(the sector that is read recovery processed) will be revised. At thistime, the data is written (a duplicated writing of the same data) to theoriginal sector and the back up area (more specifically, the sector inwhich data is held in the back up area).

[0015] 3) For an error that occurs during read processing to a sector, afunction to judge whether the sector has the symptom of a failure or notis provided and a back up process using a back up area is performed.That is, the back up process has a threshold value in the retry processin the read operation, and if the read operation is performed normallyafter a number of retries exceeding the threshold, the data of thesector is held in the back up area.

[0016] 4) When the original sector can not be read, the data at the backup sector is used.

[0017] 5) The system has a function for judging that a sector isdefective when an error has occurred in the process of a read operationfor the sector and, in such case, for executing a reassignment processof the data to an alternation area. That is, in the retry processing ofa read operation, a threshold value for the number of retries isprovided, and when the number of the retries exceeds the thresholdvalue, the sector is judged to be defective.

[0018] 6) An alternation processing is controlled based on areassignment data table including a reassigned address recording partthat registers a defective sector address, and a reassigning addressrecording part that registers the address of the alternative storingsector which is used for the alternation of the defective sector.

[0019] 7) The back up process is controlled by a back up data tablehaving a backed up address recording part that registers addresses ofsectors with the symptom of defects, a back up address recording partthat registers temporary addresses of the sectors that store the data ofthe sectors with the symptom as a temporary storage, an accumulatednumber of retries recording part that records an accumulated number ofretries, and a priority order recording part that controls a priorityorder of recording. Each registration in the back up data table isassigned a priority; for example, as the accumulated number of theretries is larger, the priority is higher. A newly found sector that hasthe symptom of a defect is registered without fail (the registering ofdefective sectors and other parameters are arbitrary to be registered)and the sectors accessed latest and with a larger accumulated number ofretries are assigned a higher priority.

BRIEF DESCRIPTION OF THE DRAWINGS

[0020]FIG. 1 illustrates an alternation data table included in thecontrol tables of the automatic reassignment control technology of thepresent invention.

[0021]FIG. 2 illustrates a back up data table included in the controltables of the automatic reassignment control technology of the presentinvention.

[0022]FIG. 3 is a block diagram of a host and a magnetic disk devicethat is integrated with a memory.

[0023]FIG. 4 is a diagram which shows a concept of each storage area onthe magnetic disk media.

[0024]FIG. 5 is a diagram that illustrates the registration of data whenthere is a space in the back up data table of the present invention.

[0025]FIG. 6 is a diagram that illustrates the additional registrationof the data when the back up data table of the present invention isfull.

[0026]FIG. 7 is a diagram that illustrates the revising the number ofretries that have already been registered to the back up data table ofthe present invention.

[0027]FIG. 8 is a diagram that illustrates the deletion of the addressthat has already been registered to the back up table of the presentinvention by the alternation processing.

[0028]FIG. 9 is a flow chart of the process of reading user data fromthe magnetic disk device of the present invention.

[0029]FIG. 10 is a flow chart of the process of the back up processingto the back up area.

[0030]FIG. 11 is a flow chart of the process of the alternationprocessing to the alternation area.

[0031]FIG. 12 is a flow chart of the process when there is data unableto be read.

[0032]FIG. 13 is a flow chart of the process of a data write operationafter the execution of back up processing and alternation processing.

MOST PREFERRED EMBODIMENT FOR THE IMPLEMENTATION OF THE PRESENTINVENTION

[0033]FIG. 1 to FIG. 13 illustrates an embodiment for the implementationof the present invention.

[0034]FIG. 3 shows an example of the configuration of a personalcomputer system that uses a magnetic disk device 3 integrated with amemory 33. The personal computer has a central processing unit or hostcomputer 1 and the magnetic disk device 3 operating as an externalmemory device. This basic configuration can be employed where a host 1is the host of a large computer system and the magnetic disk device 3operates as an external memory device. The magnetic disk device 3comprises a microprocessor 31, a hard disk controller 32, a memory 33and a disk unit (magnetic recording medium) 2. The microprocessor 31controls the magnetic disk device 3. The hard disk controller 32 takespart in transmitting and receiving data and commands of the host 1 andthe disk unit 2. The memory 33 has an area for holding data accessedfrom the host 1, an area to store an alternation data table 4 based oncontrol data stored in the disk unit 2, and a back up data table 5.

[0035]FIG. 4 shows the configuration of the disk unit 2. Tracks 22 arearranged in a concentric circular form on the both sides of theindividual disks, which represents a plural recording medium. On eachtrack 22, plural sectors that represent a kind of the recording units ofthe data are formed. On the both sides of each disk, magnetic heads, thedistances of which from the rotational center of the disk are almost thesame, move radially in the same direction at the same time on the disksurface to position the magnetic heads (seeking operation) on theobjective track 22, and these magnetic heads are arranged facing therespective surfaces of the magnetic disks. Through the magnetic heads,the writing and reading of said sectors in any of the tracks 22 areperformed. The track 22 has a user data area 22 a, which the data iswritten to and read from, a control area 22 b in which the alternationdata table 4 and the back up data table 5 are stored, an alternationarea 22 c that stores the data produced in the alternation processing,and a back up area 22 d that stores the backed up data in the back upprocessing.

[0036] Any access from the host 1 to a sector is executed by assigningaddresses, such as cylinder number, head number and sector number of thecylinder 21.

[0037]FIG. 1 shows an example of the configuration of the alternationdata table 4 and FIG. 2 shows an example of the configuration of theback up data table 5. These tables are stored in the control area 22 bof the disk 2. Just after the power of the magnetic disk device isturned on, or before writing to or reading from the magnetic disk unit2, these tables are developed and stored into the storing area of thememory 33 and the alternation processing and the back up processing arecontrolled using these tables. This control data can be stored in thecontrol area 22 b before power off, or at a predetermined time periodafter the power on of the magnetic disk device, in order to prepare forits use after the next power on.

[0038] The alternation data table 4 (FIG. 1) has a recording part 41storing an address to be backed up and a recording part 42 storing aback-up address. These addresses are configured when a defect of asector is generated. In this regard, the address of a defective sectoris registered to the recording part 41 as the address to be backed up,and an address of an alternative sector is additionally registered tothe recording part 42 as a back up address in the alternation data table4. Accordingly, the disk unit 2 can be accessed without accessing thedefective sector in a writing or reading operation.

[0039] The back up data table 5 (FIG. 2) is provided with a recordingpart 51 storing an address to be backed up, a recording part 52 storinga back up address, a recording part 53 indicating an accumulated numberof retries and a recording part 54 indicating the priority order of theentry. When a sector read from the disk 2 is judged to be a sector thathas a symptom of a defect (a defect symptom sector), an address of thedefect symptom sector and a back up address are registered in the backedup address recording part 51 and the back up address recording part 52,respectively. Hereby, when it suddenly becomes impossible to read thedefect symptom sector at the next read timing, a read error can beavoided by reading the storage area identified by the back up address.

[0040] To avoid a deterioration of performance owing to the duplicatedwriting of the addresses to be backed up and the back up addresses, thenumber of entries to the back up data table 5 is limited, and this iscontrolled using the accumulated number of retries recording part 53 andthe priority recording part 54. In this way, the back up data with ahigher priority can always be held on the drive.

[0041] In an actual case, a second number of retries N2 (an alternationprocessing threshold value) and third number of retries N3 (a back upprocessing threshold value) are set in addition to a maximum number ofretries N1 for control of the upper limit number of retries. The numberof retries N2 is a parameter used to determine whether the alternationprocessing should be performed or not, and it is smaller than themaximum number of retries N1. The number of retries N3 is a parameterused to determine whether the back up processing should be performed ornot, and it is smaller than the number of retries N2 (but N3 is notzero).

[0042] When a read error is generated at the time of reading from thedisk 2, the reading process is performed again. When a retry of thereading is normally accomplished with a number of retries that exceedsthe threshold value of the back up processing and that is equal to orless than the threshold value of the alternation processing, the sectoris judged to be a defect symptom sector. The read sector data is writtento the back up area and the back up data table 5 is updated.

[0043] When a read operation is normally performed with the number ofretries exceeding the threshold value of the alternation processing, thesector is judged to be a defect sector, the read sector data is writtento the alternative area and the alternation data table 4 is updated.

[0044] If normal reading cannot be performed with the number of retriesreaching the maximum number of retries N1, the back up data table 5 isaccessed, and when the address of the sector is registered in therecording part 51 as an address to be backed up, the sector identifiedby the back up address in the back up area is read. Then, the address tobe backed up that cannot be read is judged to be a defective sectoraddress, the data at the back up address is written to the alternativearea, the alternation data table 4 is updated and the read unablecondition is avoided. The process of updating the back up data table 5by the implementation of the present invention is illustrated in FIG. 5to FIG. 8. The maximum number of entries in the table 5 is 5 in thisexample.

[0045] In FIG. 5, when there is room in the back up data table 5 (5 aentry in the table, while 5 b to 5 k and 5 m indicate revised entries),and when an additional entry for a defect symptom sector is needed, theaddress of the defect symptom sector is registered in the recording part51 as an address to be backed up and the number of retries is registeredin the recording part 53 as an accumulated number of retries (5 b). Theaccumulated number of retries is compared to the other accumulatednumbers of retries that have already been registered to the back up datatable 5. If the accumulated number of retries is equal to or more thanthe other accumulated numbers in one or more other entries, the priorityof it is set higher than the priority of those entries, and the priorityrecording part 54 is updated accordingly (5 c). Hereby, the data of thedefect symptom sector can be guaranteed.

[0046] In FIG. 6, when an additional entry for a defect symptom sectoris needed in the table 5 after the number of registrations reaches themaximum registration number, the registration (5 d) which has the leastsignificance in the priority recording part 54 is deleted, and theaddress of the new defect symptom sector is registered in the addressrecording part 51 as an address to be backed up and the number ofretries is registered to the accumulated number of retries recordingpart 53 (5 e). Similar to FIG. 5, the accumulated number of retries iscompared to the numbers of retries that have already been registered,and when the accumulated number of retries is equal to or more thanthose of other accumulated numbers in one or more other entries, it isgiven a higher priority than the priority of those entries, and thepriority recording part 54 is updated accordingly (5 f). Hereby, thedata of the defect symptom sector that has been recently accessed can beguaranteed.

[0047] In FIG. 7, when the number of retries that is judged to be thesymptom of a defect is generated at an address to be backed up (5 g)that has already been registered to the back up data table 5, the recentnumber of retries is added to the accumulated number of retriesrecording part 53 (5 h), and if the accumulated number of the retries isequal to or more than the other registered entries, a higher priority isset by that entry, and the priority recording part 54 is updatedaccordingly (5 i).

[0048] In FIG. 8, when the number of retries exceeds the threshold valueof the alternation processing at an address to be backed up (5 j) thathas already been registered in the back up data table 5, or when thealternation processing is generated by a read unable condition, theaddress of the sector to be backed up and the accumulated number ofretries in the back up data table 5 are deleted from the table 5 (5 k)and the alternation processing is performed. After deleting theregistration, the priorities of the other entries are updatedaccordingly (5 m). The above-described examples are based on N2>fivetimes of retries >N3. The following is an example of an operation of theread automatic reassignment control as a preferred embodiment of thepresent invention.

[0049]FIG. 9 illustrates the control flow of a read processing. Host 1(FIG. 3) requests the hard disk controller 32 to read data from themagnetic disk device 3 indicating a cylinder number, a head number and asector number in the cylinder 21.

[0050] The magnetic disk device 3 converts a logical address from thehost 1 to a physical address on the disk unit 2 to access the disk unit2 (FIG. 9, step 101). Then it clears a retry counter to zero (step 102).After that, the data is read from the disk unit 2 (step 103), and thenthe data is checked to determine if a read error has been generatedusing the ECC etc. (step 104).

[0051] When a read error has been generated, the retry counter isincremented by 1 (step 107), a judgement is made to determine whetherthe retry counter has exceeded the maximum number of retries N1 or not(step 108), and, if not, the read processing (step 103) is performedagain.

[0052] If the reading is indicated as having been normally performed atsteps 104, the content of the retry counter is checked to see if it islarger than N3 or not (step 105). If the content of the retry counter isequal to N3 (a back up processing threshold value) or less, the readprocessing is not performed again (step 103), since it is determinedthat normal reading has been performed, and the read processingrequested by the host 1 ends.

[0053] If it is determined that the content of the retry counter exceedsN3 (the back up processing threshold value) at step 105, it is checkedto determine whether the content of the retry counter has exceeded thealternation process threshold value (N2) or not (step 106). When thecontent of the retry counter is equal to or less than the alternationprocessing threshold value (N2), a back up processing to the back uparea illustrated in FIG. 10 is performed. When the content of the retrycounter exceeds N2, an alternation processing to the alternation areaillustrated in FIG. 11 is performed. When the content of the retrycounter reaches the maximum number of retries N1 (step 108), theprocessing of the read unable illustrated in FIG. 12 is performed.

[0054] The back up processing to the back up area will be explained withreference to FIG. 10.

[0055] First, a search is made to determine whether the address of asector with an error is registered in the back up data table 5 (step201). If it is already registered, the recent number of retries is addedto the accumulated number of retries recording part 53 of the back updata table 5 (step 203). On the other hand, if it is not registered,whether the number of entries in the back up data table 5 is up to themaximum number or not is checked (step 206), and if there is no room fora new entry in the back up data table 5, the entry with the address tobe backed up which has the least significant priority in the priorityrecording part 54 is deleted (step 207), and an area to register thecontent of the defect symptom sector that is newly generated, isreserved. This effects preservation with priority of the recentlyaccessed sector. The data of the sector that is newly read is written tothe back up area (step 208), the sector address is registered as anaddress to be backed up in recording part 51 and the number of retriesis newly registered to the accumulated number of retries recording part53 (step 209). As the accumulated number of retries is newly registeredor is added to the previously registered number, the priority of theother entries is updated in the priority recording part 54 (step 204).The revised back up data table 5 is written to the back up data storingaddress of a disk control area (step 205).

[0056] The alternation processing to the alternation area as shown inFIG. 11 will be explained next.

[0057] First, a search is made to determine whether the sector addressis registered as an entry in the back up data table 5 or not (step 301).If it has already been registered, the back up is no longer needed,since the data will be written to the alternation area. Hence, the entryof the sector address in the back up data table 5 is deleted (step 303).In order to re-establish the order of the priority caused by thedeletion of the entry from back-up table 5, a revision of the prioritiesin the priority recording part 54 of the back up data table 5 isperformed (step 304). Then, the data is written to the storing addressof the back up data table 5 in the disk control area (step 305). Thenewly read data is written to the alternation area (step 306), the newlyread sector address is registered to the address to be backed uprecording part 41 of the back-up data table 4, the alternating addressof the alternating area is registered to the back-up address recordingpart 42, and these items are written to the storing address ofalternation data table 4 of the disk control area (step 307).

[0058] The processing for the case of the read unable conditionillustrated will be FIG. 12 is explained.

[0059] First, a search is made to determine whether the address of asector with an error is registered as an entry in the back up data table5 or not (step 401, step 402). If it is not registered, the processingto report a read error to the host 1 is executed (step 413). If there isa registration in the back up data table 5, the retry counter is clearedto zero (step 403). Then, the back up address of the sector is read fromthe disk unit 2 (step 404), and it is determined whether an error isgenerated using the ECC etc. (step 405).

[0060] When the reading is performed normally, the entry of the sectoraddress is deleted from the back up data table 5 (step 406). Thepriority recording part 54 of the back up data table 5 is revised (step407), and then the data is written to the storing address of the back updata table 5 of the disk control area (step 408). The newly read data iswritten to the back-up area (step 409), the address to be back-up thatis unable to be read is registered to the address to be back-uprecording part 41 of the alternation data table 4, the back-up addressof the alternation area is registered to the back-up address recordingpart 42, and those items are written to the storing address of thealternation data table 4 of the disk control area (step 410).

[0061] When the back up address cannot be read, the retry counter isincremented by 1 (step 411), and it is determined whether the content ofthe retry counter is equal to the maximum number of retries N1 or not(step 412). When it is less than N1, the process is repeated from theread processing of the back up address (step 404). When the back upaddress cannot be read (the number of retries reaches N1), a read erroris reported to the host 1 (413).

[0062] An example of a write processing operation in the alternationprocessing and the back up processing described above will be explained.FIG. 13 illustrates the control flow of the write processing.

[0063] The host 1 sends the write request to the hard disk controller 32in the magnetic disk device 3 indicating the cylinder number, the headnumber, the sector number of a cylinder 21. The magnetic disk device 3converts a logical address to a physical address for accessing the diskunit 2 (step 501) and searches into the alternation data table 4 beforewriting data to the disk unit 2 (step 502).

[0064] If the address of the sector is registered in the alternationdata table 4, the physical address is reassigned to the back-up address(step 509). Then, a search is made to determine whether the accessingaddress is registered to the back up data table 5 (step 504). When it isregistered, a back up processing flag that indicates that back upprocessing has been executed is set to 1 (step 510). When it is notregistered, the back up processing flag is set to 0, in other words, toclear the back up processing flag (step 506). Then, the write processingis executed (step 507), and when the back up processing flag is 1, thesame data is written to the back up address (step 511). In this way, thedata corresponding to the address to be backed up and the data of theback up address, which addresses are registered in the back up datatable 5, are kept the same. Therefore, when a read error is generated atthe address to be backed up, the data of the back up address can bereferred to because the addresses are registered in the back up datatable 5.

[0065] The present invention extends the practical life of the magneticdisk drive, suppressing an elongation of the data access time caused byretries. More specifically, because the magnetic disk device 3 of thepresent invention has, besides the alternation data table 4 thatcontrols the defective sector, the back up data table 5 that keeps theaddress to be backed up and the back up address of the defect symptomdata sector, and the back up area including the back up address to whichdata is backed up, the defect symptom data sector can be guaranteed.

[0066] Because the back up data table 5 has a recording part that holdsthe accumulated number of retries and the disk drive system candetermine the priority based on the accumulated number of retries,frequently used data can be guaranteed.

[0067] In the case of a read unable condition, the condition can beavoided if the content of the sector that cannot be read is registeredin the back up data table 5. Therefore, a magnetic disk device with theleast possibility of losing data can be achieved.

What is claimed is:
 1. An automatic read reassignment method, comprising the steps of: an inputting step for inputting a read command issued from a host to read a desired data from a magnetic disk media; a retry step for retrying a read operation when an error is generated in the read operation; a recovering step in which a read operation completes normally; and a storing step for storing a read data to a back up area.
 2. The automatic read reassignment method according to claim 1, further comprising the steps of: an inputting step for inputting a write command issued from the host to write data to the magnetic disk media; a writing step for writing data to the magnetic disk media; and a storing step for storing data to a back up area.
 3. The automatic read reassignment method according to claim 1 or claim 2, each step is generated at the sequence of the description.
 4. An automatic read reassignment method, comprising the steps of: an inputting step for inputting a read command issued from a host to read a desired data from a magnetic disk media; a retry step for retrying a read operation when an error is generated in the read operation; and a step for performing one of next three steps depending on a number of the retrying the read operation when there is a relation of N1>N2>N3>0 among the natural number of N1, N2 and N3. 1) a reporting step for reporting a read unable status to the host when the number of the retrying the read operation is equal to first threshold value N1. 2) a writing step for writing the data that is read out at the retry step to an alternation area when the number of the retrying the read operation is larger than second threshold value N2 but smaller than first threshold value N1. 3) a writing step for writing the data that is read out at the retry step to a back up area when the number of the retrying the read operation is larger than third threshold value N3 but is not larger than second threshold value N2.
 5. The automatic read reassignment method according to claim 4, further comprising the steps of: a step for judging the backed up sector is unable to be read; and a step for issuing the backed up data to the host.
 6. A magnetic disk drive, comprising: a magnetic disk media that is stored with data from a host; a hard disk controller that controls to transfer data and commands between the host and the magnetic disk media; a memory for storing an alternation data table that stores the address of a sector with defect and the address of an alternating sector when the sector with defect is generated, and a back up data table that stores the address of a sector to be backed up and the address of a back up sector; and a microprocessor having a function for writing the data that is read out with a retry operation, to an original storing position, a back up area or an alternation area, according to the number of retries in the retry operation when an error is generated in data at a read operation.
 7. The magnetic disk drive according to claim 6, wherein said microprocessor selects a candidate of the data for transferring it to the alternation area referring to the number of retries in the retry operation accompanying a read error, stores the candidate to the back up area that is a temporary storing area, and decides dynamically the priority in an alternation depending on the number of retries in a following retry operation. 